<template>
    <el-dialog title="退税明细" :visible.sync="dialogVisible" width="40%" :before-close="handleClose">

        <el-row :gutter="24" class="info-row">
            <el-col :span="24">
                退税金额：<span>{{info.sellerTaxRefundList.amount}}元</span>
            </el-col>

        </el-row>
        <el-row :gutter="24" class="info-row" v-if="info.sellerBankList != null">
            <el-col :span="8">
                供应商开户行名称：<span>{{info.sellerBankList.bankName}}元</span>
            </el-col>
            <el-col :span="8">
                银行账号：<span>{{info.sellerBankList.accountNo}}元</span>
            </el-col>
            <el-col :span="8">
                账户名：<span>{{info.sellerBankList.accountName}}元</span>
            </el-col>
        </el-row>
        <el-row :gutter="24" class="info-row">
            <el-col :span="8">
                退税单：查看
                <el-image style="width: 18px; height: 16px" :src="iconUrl" :preview-src-list="[info.sellerTaxRefundList.billUrl]">
                </el-image>
            </el-col>
            <el-col :span="8">
                支付凭证：查看
                <el-image style="width: 18px; height: 16px" :src="iconUrl" :preview-src-list="[info.sellerTaxRefundList.payUrl]">
                </el-image>
            </el-col>
        </el-row>

    </el-dialog>
</template>
<script>
export default {
    components: {},
    data () {
        return {
            iconUrl: require("@/assets/img/icon_Attachment@2x.png"),
            dialogVisible: false,
            loading: false,
            info: {
                sellerTaxRefundList: {},
                sellerBankList: {}
            }
        };
    },
    methods: {

        async handleOpen (item) {

            if (item.id) {

                this.dialogVisible = true;

                const params = {
                    id: item.id,
                };
                this.loading = true;
                let res = await this.$get({ url: "/sellerTaxRefundList/getById", params })
                this.info = res
                this.loading = false;
            }
        },
        handleClose () {
            this.dialogVisible = false;
        },
    },
};
</script>
<style  lang="scss">
.nameBlock .el-input-group__append {
    background-color: #409eff;
    color: #fff;
}
</style>
